define([
    "ngController"
],function (appAngular) {

    // 底部按钮先关-可拖动模块-7、剖切
    appAngular.directive("bimApiModelSection", function () {
        return {
            restrict: "EA",
            replace: true,
            template: `<div class="draggable model-section" 
                            style="display: {{(btnsSelect.name=='section'&&btnsSelect.check == true)?'block':'none'}}">
					    <div class="section-header">
					    	<h3>剖切</h3>
					        <img ng-src="{{baseUrl + imgDragClose}}" ng-click="modelDragTitleClose()">
					    </div>
					    <div class="section-content">
					        <div class="section-every">
					          	<span>剖切轴：</span>
					          	<div class="section-way">
						            <label>
						              	<input type="radio" name="sectionWay" class="k-radio" value="x" ng-model="modeSection.section"/>
						              	<span class="k-radio-label">X轴</span>
						            </label>
						            <label>
						              	<input type="radio" name="sectionWay" class="k-radio" value="y" ng-model="modeSection.section"/>
						              	<span class="k-radio-label">Y轴</span>
						            </label>
						            <label>
						              	<input type="radio" name="sectionWay" class="k-radio" value="z" ng-model="modeSection.section"/>
						              	<span class="k-radio-label">Z轴</span>
						            </label>
						            <label>
						              	<input type="radio" name="sectionWay" class="k-radio" value="box" ng-model="modeSection.section"/>
						              	<span class="k-radio-label">盒子</span>
						            </label>
					          	</div>
					        </div>
					        <div class="section-every">
					          	<span>图层：</span>
					          	<div class="dropdown">
									<button class="dropbtn" title="{{modeSection.select}}">
										<span class="dropbtn-text">{{modeSection.select}}</span>
									</button>
									<div class="dropdown-content">
										<a ng-repeat="item in modeSection.coverage" ng-click="modelSectionDropdownSelect(item)">{{item}}</a>
									</div>
								</div>
				        	</div>
				      	</div>
				    </div>`,
            link: function ($scope, $elem, attrs) {
                // 模型中-7-剖切属性
                $scope.modeSection = {
                    sectionWay: {
                        x: 'X轴',
                        y: 'Y轴',
                        z: 'Z轴',
                        box: '盒子'
                    },
                    section: 'box',
                    coverage: ['图层一', '图层二', '图层三', '图层四', '图层五', '图层六'],
                    select: '图层一'
                };
            }
        };
    });

    return appAngular;
});